package com.pufa.demo.dao;

import org.dom4j.Document;

import com.pufa.util.Dom4jUtil;

public class DataSource {
	
	/**
	 * 数据源xml路径
	 */
	public static final String XML_PATH = System.getProperty("user.dir") + "\\data.xml";
	
	private static Document doc = null;

	
	public static Document getDataSource () throws Exception {
		if (doc == null) {
			doc = Dom4jUtil.getOrCreateDoc(XML_PATH);
		}
		return doc;
	}
	
}
